﻿<UserControl xmlns:my1="clr-namespace:VAdvantage.MainScreen"  xmlns:my="clr-namespace:Desktop"  x:Class="Desktop.MainScreen"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:local="clr-namespace:VAdvantage.Converter"
    mc:Ignorable="d"
             xmlns:widgets="clr-namespace:VAdvantage.Widgets"
    d:DesignHeight="300" d:DesignWidth="701" Background="Red">
             
    
    <UserControl.Resources>
       
    


       
            <local:ImagePathConverter x:Key="ImgPathConverter" />

        <DataTemplate x:Key="YTDataTemplate">
            <StackPanel Orientation="Horizontal"  Loaded="StackPanel_Loaded" Margin="0" >
                <Grid Width="80" Height="60">
                <Image Source="{Binding ThumbnailImage, 
                               Converter={StaticResource ImgPathConverter}}"  />
                    <Image Width="24" Height="18" Cursor="Hand" VerticalAlignment="Center" HorizontalAlignment="Center" Source="../Images/YTPlay.png"></Image>
                </Grid>
                <TextBlock HorizontalAlignment="Stretch" Width="100"   TextWrapping="Wrap" Margin="8,4,2,0"
                                   Text="{Binding Title}"  />
            </StackPanel>
        </DataTemplate>

    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" ></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="Auto" ></RowDefinition>
        </Grid.RowDefinitions>
        
        <my:VExpender x:Name="rightExpander" Grid.Column="2"  Grid.Row="1" Width="220" Visibility="Visible"  IsExpanded="True" Margin="0,40,0,20">
           
        </my:VExpender>
        <!--<my:VExpender Grid.Column="1" Canvas.ZIndex="1000" x:Name="TopExpander" Grid.ColumnSpan="2"  Height="60" IsExpanded="True"  ExpanderStyle="Top" Loaded="VExpender_Loaded">
        </my:VExpender>--> 
        
        <Grid x:Name="centerGrid" Grid.Column="1" Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" ></ColumnDefinition>
                <ColumnDefinition Width="Auto" ></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <my1:DesktopShortcutContainer x:Name="desktopContainer" />
            <widgets:WeatherControl Grid.Column="1"  x:Name="WeatherCtrl" Margin="0,14,6,0" HorizontalAlignment="Right" Width="306" Height="159" VerticalAlignment="Top"></widgets:WeatherControl>
        </Grid>
        
    </Grid>
</UserControl>
